]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginManager: Fix canRebootToBootLoaderMenu() result
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Sep 2022 14:37:25 +0000 (16:37 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 6 Sep 2022 20:57:49 +0000 (20:57 +0000)
Since commit a3db9093834, the `result` variable holds the
destructured result of the D-Bus call, not the results array
as previously.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2472>

js/misc/loginManager.js

index 6549fe5adc31f086d5eb964b0d088d788114bbd4..94d62e8192f83f7fa64c2e60decf5a3104e0f298 100644 (file)
@@ -164,8 +164,8 @@ var LoginManagerSystemd = class extends Signals.EventEmitter {
 
         try {
             const [result] = await this._proxy.CanRebootToBootLoaderMenuAsync();
-            needsAuth = result[0] === 'challenge';
-            canRebootToBootLoaderMenu = needsAuth || result[0] === 'yes';
+            needsAuth = result === 'challenge';
+            canRebootToBootLoaderMenu = needsAuth || result === 'yes';
         } catch (error) {
             canRebootToBootLoaderMenu = false;
             needsAuth = false;